﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Agents.Data;

namespace Agents
{
    public partial class NotificationDetails : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        /// <summary>
        /// Closes the popup
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void closeBtn_Click(object sender, EventArgs e)
        {
            Response.Write("<script language='javascript'>self.close();</script>");
        }

        /// <summary>
        /// Deletes this notification
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void deleteBtn_Click(object sender, EventArgs e)
        {
            // Delete this notification
            Queries queries = new Queries();
            queries.DeleteNotification(Int32.Parse(Request.QueryString["notificationId"]));
            Response.Write("<script language='javascript'>self.close();</script>");
        }
    }
}